<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Mod_phongkhamvip extends CI_Controller {
    private $table = 'phongkham';


	public function index($data=array('idchuyenkhoa'=>'','iddiadiem'=>'')){
	   $idchuyenkhoa = $data['idchuyenkhoa'];
       $iddiadiem =  $data['iddiadiem'];
       if(!empty($idchuyenkhoa)){
        if( empty($iddiadiem)){
            $data['data'] = $this->home_model->get_data($this->table,array('idchuyenkhoa' =>$idchuyenkhoa,'vip' =>1),array('truong'=>'point2','sapxep'=>'ASC'),5,array('title','hits','address','logo'));
        }else $data['data'] = $this->home_model->get_data($this->table,array('idchuyenkhoa' =>$idchuyenkhoa,'iddiadiem'=>$iddiadiem,'vip' =>1),array('truong'=>'point2','sapxep'=>'ASC'),5,array('title','hits','address','logo'));
        }
        if(empty($data['data'])){
            $data['data'] = $this->home_model->get_data($this->table,array('vip' =>1),array('truong'=>'point2','sapxep'=>'ASC'),5,array('title','hits','address','logo'));
        }
        $this->load->view('mod_phongkhamvip/vmod_phongkhamvip',$data);
	}
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */